def num2words(num):
    chinese_numerals = {
        0: '零',
        1: '壹',
        2: '贰',
        3: '叁',
        4: '肆',
        5: '伍',
        6: '陆',
        7: '柒',
        8: '捌',
        9: '玖'
    }

    chinese_units = ['分', '角', '', '拾', '佰', '仟', '万']

    def int_to_chinese(num):
        intNum = int(num * 100)
        num_str = str(intNum)
        chinese_str = ''
        # 421 00
        for i, digit in enumerate(reversed(num_str)):
            digit = int(digit)
            if i == 2:
                chinese_str = '元' + chinese_str
            if digit != 0:
                chinese_str = chinese_numerals[digit] + chinese_units[i] + chinese_str
            else:
                if chinese_str.startswith('零') or chinese_str.startswith('元') or i <= 2:
                    continue
                chinese_str = chinese_numerals[digit] + chinese_str
        return chinese_str

    if num == 0:
        return chinese_numerals[0]
    elif num < 0:
        return '负' + int_to_chinese(abs(num))
    else:
        return int_to_chinese(num)
